//
//  ONColumnTitleObject.m
//  Volatix
//
//  Created by Anh Tran on 6/10/14.
//  Copyright (c) 2014 Familly. All rights reserved.
//

#import "ONColumnTitleObject.h"

@implementation ONColumnTitleObject
#pragma mark - NSCoding Methods

- (id)initWithCoder:(NSCoder *)aDecoder
{
    self = [super init];
    
    self.name = [aDecoder decodeObjectForKey:@"name"];
    self.allowToSelect = [aDecoder decodeBoolForKey:@"allowToSelect"];
    self.mainColumn = [aDecoder decodeIntForKey:@"mainColumn"];
    
    return self;
}

- (void)encodeWithCoder:(NSCoder *)aCoder
{
    
    [aCoder encodeObject:self.name forKey:@"name"];
    [aCoder encodeBool:self.allowToSelect forKey:@"allowToSelect"];
    [aCoder encodeInt:self.mainColumn forKey:@"mainColumn"];
    
    
}

- (id)copyWithZone:(NSZone *)zone
{
    ONColumnTitleObject *copy = [[ONColumnTitleObject alloc] init];
    
    if (copy) {
        
        copy.name = [self.name copyWithZone:zone];
        copy.mainColumn = self.mainColumn;
        copy.allowToSelect =self.allowToSelect;
    }
    
    return copy;
}


@end
